﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace ReferToFriend.Dapper
{
    public class ReferFriend
    {
        public int Id { get; set; }
        [Required(ErrorMessage="You must type your Email to continue")]
        [DataType(DataType.EmailAddress)]
        [EmailAddress]
        public string YourEmail { get; set; }
        [Required(ErrorMessage = "You must type friend's Email to continue")]
        [DataType(DataType.EmailAddress)]
        [EmailAddress]
        public string FriendEmail { get; set; }
        [RegularExpression("(^[a-zA-Z]+$)|(^[a-zA-Z]+[ ][a-zA-Z]+$)", ErrorMessage = "Correct your name to continue")]
        public string YourName { get; set; }
        [DataType(DataType.PhoneNumber)]
        [Phone]
        public string PhoneNumber { get; set; }
        public string Comment { get; set; }
        public bool IsSendEmailCopy { get; set; }
        public DateTime ReferDate { get; set; }
    }
}